package stool.singletonpattern.part1;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/12
 * @Description 懒汉式
 */
public class Singleton
{
    private Singleton(){}

    private static Singleton singleton;

    public static Singleton getSingleton()
    {
        if (singleton == null)
        {
            singleton = new Singleton();
        }
        return singleton;
    }
}
